#ifndef LEMC_HELPSYMBOL_H
#define LEMC_HELPSYMBOL_H

#include "WindowsIncludes.h"
#include <allegro5/allegro.h>
#include <allegro5/allegro_font.h>
#include <allegro5/allegro_ttf.h>
#include <string>
#include <functional>

#include "guielement.h"
#include "../resourcemanager/allegro_bitmap_manager.h"
#include "../system/global.h"
#include "../system/system.h"

/*
* Provides the functionality of a symbol that shows help text on mouseover.
*/
class HelpSymbol : public GuiElement
{
protected:
	// The graphic id of the graphic.
	std::string m_graphic;

	// The font of the label.
	ALLEGRO_FONT* m_label_font;

	// The color of the label.
	ALLEGRO_COLOR m_label_color;

	// The label text shown on mouseover.
	std::string m_label;

	// True if the mouse cursor is on the symbol.
	bool m_on_symbol;

public:
	/*
	* Creates the symbol.
	*
	* @param id The id of the symbol, should be unique.
	* @param x The x position of the upper left corner of the symbol.
	* @param y The y position of the upper left corner of the symbol.
	* @param size_x Horizontal size of the symbol.
	* @param size_y Vertical size of the symbol.
	* @param graphic The graphic to show.
	* @param label_font The label of the font to show. 
	* @param label The label to show on the button.
	* @param label_color The color of the label on the button.
	*/
	HelpSymbol(std::string id, int x, int y, int size_x, int size_y, ALLEGRO_FONT* label_font = NULL,
		std::string label = "", const unsigned char label_color[3] = STANDARD_HELPSYMBOL_LABEL_COLOR,
		std::string graphic = STANDARD_HELPSYMBOL_GRAPHIC);
	virtual ~HelpSymbol();

	void MouseAxisChange(int x, int y);

	void Draw();
};

#endif